//
//  homeCollectionViewCell.m
//  EasyToTesco2.0
//
//  Created by 杨森 on 16/6/4.
//  Copyright © 2016年 EasyToTesco. All rights reserved.
//

#import "homeCollectionViewCell.h"

@implementation homeCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        
        [self addUI];
    }
    return self;
}


- (void)addUI
{
    self.productImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.width, self.Height/7*5)];
    [self addSubview:self.productImage];
    
    self.productName = [[UILabel alloc] initWithFrame:CGRectMake(5,CGRectGetMaxY(self.productImage.frame)+5,self.width-10, self.Height/8)];
    self.productName.numberOfLines = 2;
    self.productName.font =[UIFont systemFontOfSize:12];
    [self addSubview:self.productName];
    
    self.price = [[UILabel alloc] initWithFrame:CGRectMake(5,CGRectGetMaxY(self.productName.frame)+2, self.productName.width, self.productName.Height)];
     self.price.font =[UIFont systemFontOfSize:12];
    self.price.textColor = DEFAULT_COLOR;
    [self addSubview:self.price];
}
@end
